package com.huohuo.javabasic.reference;

import java.lang.ref.WeakReference;

/**
 * @Description: 弱引用
 * @Author: yangw
 * @Method: 
 * @Param:  
 * @Return: 
 * @Expression: 
 * @Date: 2019/3/17 16:31
 */
public class WeakReferenceTest {
    public static void main(String[] args) {
        String a = "123";
        WeakReference<String> weakReference = new WeakReference<>( a );
        String b = weakReference.get();
        System.out.println(b);
    }
}
